package com.herench.bs.handler;

import com.herench.bs.annotation.Handler;
import com.herench.bs.support.AbstractMessageHandler;
import com.herench.bs.support.RequestMessage;
import com.herench.bs.support.ResponseMessage;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by ThinkPad on 2018/3/8.
 */
@Component
@Handler(code = "101101" ,name="楼层导航")
public class RoadMapGuideHandler extends AbstractMessageHandler {

    @Override
    protected ResponseMessage innerHandler(RequestMessage requestMessage) throws Exception {
        ResponseMessage responseMessage = new ResponseMessage(requestMessage.getId());
        String channelCode = requestMessage.getArgsPropertyStringValue("sysCode");
//        List<Map<String, Object>> resultList = new ArrayList<>();

//        if (channelCode.equals("100101")) {

            Map<String, Object> roadMap = new HashMap<>();
//            resultList.add(roadMap);
            List<Map<String, Object>> roadList = new ArrayList<>();
            roadMap.put("roadList",roadList);
            Map<String, Object> roadMap1 = new HashMap<>();
            roadMap1.put("A", "收费挂号处 医疗保险科 心功能科");
            roadMap1.put("B", "收费挂号处 医疗保险科 心功能科");
            roadMap1.put("C", "收费挂号处 医疗保险科 心功能科");
            roadList.add(roadMap1);
//        }
        responseMessage.setDataAttribute("url", "http://39.106.103.34:E:/hospitalPicture/20180308172454.jpg");
        responseMessage.setDataAttribute("url1", "http://39.106.103.34:E:/hospitalPicture/20180308172454.jpg");
        responseMessage.setDataAttribute("roadList", roadList);
        responseMessage.setCode("0");
        responseMessage.setMessage("请求成功");
        return responseMessage;
    }


}
